# f = open('1.txt', 'w', encoding='utf-8')
# f.write("我爱你\n")
# f.write("我爱你\n")
# f.write("我爱你\n")
# f.close()

# f = open('1.txt', 'r', encoding='utf-8')
# L = f.readlines()
# print(L)
# f.close()

# 上下文管理器
with open('1.txt', 'r', encoding='utf-8') as f:
    print(f.closed)
    for line in f:
        print(line)
print(f.closed)
